import 'package:flutter/material.dart';
import 'SingleChildScrollViewRoute.dart';
import 'ListViewRoute.dart';
import 'GridViewRoute.dart';
import 'CustomScrollViewTestRoute.dart';
import 'ScrollControllerTestRoute.dart';

class ScrollWidgetsPage extends StatefulWidget {
  @override
  _ScrollWidgetsPageState createState() => new _ScrollWidgetsPageState();
}

class _ScrollWidgetsPageState extends State<ScrollWidgetsPage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Wrap(
          spacing: 8.0,
          runSpacing: 4.0,
          alignment: WrapAlignment.center,
          children: <Widget>[
            RaisedButton(
                colorBrightness: Brightness.dark,
                child: Text('SingleChildScrollView'),
                onPressed: () {
                  Navigator.push(
                    context,
                    new MaterialPageRoute(
                      builder: (context) {
                        return new SingleChildScrollViewRoute();
                      },
                    ),
                  );
                }),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('ListViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new ListViewRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('GridViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new GridViewRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('CustomScrollViewTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new CustomScrollViewTestRoute();
                    },
                  ),
                );
              },
            ),
            RaisedButton(
              colorBrightness: Brightness.dark,
              child: Text('ScrollControllerTestRoute'),
              onPressed: () {
                Navigator.push(
                  context,
                  new MaterialPageRoute(
                    builder: (context) {
                      return new ScrollControllerTestRoute();
                    },
                  ),
                );
              },
            ),
          ],
        ),
      ),
    );
  }
}
